    table.on('tool([dy:tn])',
    function(obj) {
        var data = obj.data;
		if (obj.event === '[dy:tn]_edit') {
			var _this = $(this);
			  layer.open({
				type: 2
				,title: '[dy:title]'
				,content: '[dy:tn]_frm.asp?now=' + new Date().getTime()+"&id="+data.id
				,maxmin: true
				,area: ['500px', '450px']
				,btn: ['确定', '取消']
				,yes: function(index, layero){
				  var iframeWindow = window['layui-layer-iframe'+ index]
				  ,submitID = 'LAY-user-front-submit'
				  ,submit = layero.find('iframe').contents().find('#'+ submitID);
				  iframeWindow.layui.form.on('submit('+ submitID +')', function(data){
					var field = data.field; 
						$.post(layui.setter.base + 'lib/reg.asp?now=' + new Date().getTime(), {
							action: "[dy:tn]_edit",
							field
						},
						function(data) {
							if (data == '1') {
								layer.msg("成功!!");
							} else {
								layer.msg("失败！！ "+data);
							}
						});
					table.reload('[dy:tn]'); //数据刷新
					layer.close(index); //关闭弹层
				  });  
				  submit.trigger('click');
				}
				,success: function(layero, index){
				}
				});				
			table.reload('[dy:tn]');
		}		
		else if (obj.event === '[dy:tn]_del') {
			var _this = $(this);
			layer.confirm('您确定删除此信息？' + data.id, {
				icon: 3,
				title: '提示信息'
			},
			function(index) {
				$.post(layui.setter.base + 'lib/reg.asp?now=' + new Date().getTime(), {
					id: data.id,
					action: "[dy:tn]_del"
				},
				function(data) {
					if (data == '1') {
						layer.msg("成功!!");
					} else {
						layer.msg("失败！！ "+data);
					}
				});
				layer.close(index);
				table.reload('[dy:tn]');				
			});
		}	
	});	